package com.corpgovernment.organization.mapper.budget;

import com.corpgovernment.organization.entity.db.budget.BudgetOccupancyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BudgetOccupancyMapper  {

    int insertSelective(@Param("entity") BudgetOccupancyEntity entity);

    int insertBatchSelective(@Param("entities") List<BudgetOccupancyEntity> entities);

    int updateSelective(@Param("entity") BudgetOccupancyEntity entity);

    int updateBatchSelective(@Param("entities") List<BudgetOccupancyEntity> entities);

    BudgetOccupancyEntity selectByBudgetIdAndProductTypeAndApplyNo(@Param("budgetId") String budgetId, @Param("applyNo") String applyNo, @Param("productType") String productType);

    List<BudgetOccupancyEntity> selectByApplyNo(@Param("applyNo") String applyNo);

    List<BudgetOccupancyEntity> selectByApplyNoAndBudgetId(@Param("applyNo") String applyNo, @Param("budgetId") String budgetId);

    List<BudgetOccupancyEntity> selectByBudgetId(@Param("budgetId") String budgetId);

    List<String> selectApplyNoWithOccupyByBudgetId(@Param("budgetId") String budgetId);

    List<BudgetOccupancyEntity> selectByBudgetIds(@Param("budgetIds") List<String> budgetIds);
}